package org.dormi.learn.product.domain.material.entity;

import lombok.Getter;
import lombok.Setter;
import org.dormi.learn.primitive.MeasureUnitEnum;

import java.math.BigDecimal;

/**
 * add description here
 *
 * @author : dormi330
 * @version : 1.0
 */
@Getter
@Setter
public class MaterialLogistics {

    // 长宽高
    private BigDecimal length;
    private BigDecimal width;
    private BigDecimal heigth;
    private MeasureUnitEnum lengthUnit;

    // 重量
    private BigDecimal netWeight;
    private BigDecimal grossWeight;
    private MeasureUnitEnum weightUnit;

    /** 该对象是个有效的对象 */
    public boolean effective() {
        if (null == lengthUnit && null == weightUnit) {
            return false;
        }
        return true;
    }

}
